#include<iostream>
using namespace std;
int main()
{
    cout<<"please input a number:"<<endl;
    int num,x=1,n=0,i,sum,temp=0,t;
    cin>>num;
    n=num/x;
    for(i=0;n>0;i++)
    {
        x*=10;
        n=num/x;
    }
    t=i;
    temp=num;
    for(sum=0;i>0;i--)
    {
        n=temp%10;
        sum+=n;
        temp/=10;
    }
    cout<<"the sum of digits is"<<sum<<",and has"<<t<<"digits."<<endl;
    return 0;
}